package com.xnyzc.lhy.task.fallback.driver;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.task.fegin.driver.QuartzDriverCashWithdrawalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class QuartzDriverCashWithdrawalServiceFallback implements QuartzDriverCashWithdrawalService {

    @Autowired
    RedisTemplate redisTemplate;

    @Override
    public void clearDriverCashWithdrawal() {
        log.error("清除司机提现次数失败");
        redisTemplate.delete(redisTemplate.keys("oa_driver_cash_withdrawal:*"));
    }

    @Override
    public Rv reFreezeBalance() {
        log.error("司机冻结余额解冻失败");
        return Rv.wrap(null);
    }

}
